#include<iostream>
#include<stdio.h>

using namespace std;

int main()
{
    int a,b;
    int num, n, cycle, cyclemax;
    int min, max;
    while(cin >> a >> b)
    {
        if(a<b) { min = a; max = b; }
        else { min = b; max = a; }
        
        cyclemax = -1;
        for(num = min; num <= max; num++) {
            cycle = 1;
            for(n = num; n != 1; cycle++)
                if((n % 2) != 0) 
                    n=3*n+1; 
                else
                    //n = n/2 
                    n >>= 1;
            if(cycle > cyclemax) 
                cyclemax = cycle;
        }
        cout << a << " " << b << " " << cyclemax << endl;
    }
    return 0;    
}
